package ilo;


public class Card {
    private String numble;
    private String name;
    private String telephone;
    private double balance;

    public Card(){}

    public Card(String numble, String name, String telephone, double balance){
        this.numble = numble;
        this.name = name;
        this.telephone = telephone;
        this.balance = balance;
    }

    public String getNumble() {
        return numble;
    }

    public void setNumble(String numble) {
        this.numble = numble;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public void deposit(double money){
        this.balance += money;
        System.out.println("充值成功！余额为："+this.balance);
    }

    public void consume(double money){
        this.balance -= money;
        System.out.println("消费成功！余额为："+this.balance);
    }


}
